﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://www.codeplex.com/EmlenMud
using System;
using System.ComponentModel;
using BrainTechLLC.ThreadSafeObjects;
#if USE_HYPER
using Hyper.ComponentModel;
#endif

namespace BrainTechLLC
{
    [TypeDescriptionProvider(typeof(HyperTypeDescriptionProvider)), Serializable]
    public class MockObjectsForClass
    {
        public bool MockRecordingEnabled { get; set; }

        public Type ClassType { get; set; }

        public ThreadSafeLookupOnDemandWithDelegate<string, MockObjectsForMethod> LookupByMethodName = new ThreadSafeLookupOnDemandWithDelegate<string, MockObjectsForMethod>();

        public MockObjectsForMethod GetMockObjectsForMethod(string methodName)
        {
            return LookupByMethodName.Get(methodName, name => new MockObjectsForMethod() { MethodName = name });
        }
    }
}

